<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

     <style>
        * {
            list-style: none;
        }
        li {
            display: inline-block;
            border: 1px black solid;
            width: max-content;
        }
        a {
            display: block;
            font-family: 楷体;
            text-align: center;
            line-height: 40px;
            text-decoration: none;
            color: black;
            background-color: rgb(134, 216, 52);
        }
        a:hover {
            color: blanchedalmond;
            background-color: brown;
        }
     </style>
</head>
<body>
    <ul>
        <li class="small1"><a href="#">&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;</a></li>
        <li class="small2"><a href="#">&nbsp;&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;</a></li>
        <li class="small3"><a href="#">&nbsp;&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;</a></li>
        <li class="small4"><a href="#">&nbsp;&nbsp;&nbsp;4&nbsp;&nbsp;&nbsp;</a></li>
    </ul>
</body>
</html>
